<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .searchbox{
            margin: 10px;
            display: flex;
        }
        .searchbox input {
            flex: 1;
            height: 40px;
            background-color: #f5f5f5;
            border: none;
            outline: none;
            border-radius: 20px;
        }

        .searchbox span {
            color: blue;
            font-weight: bolder;
            width: 60px;
            text-align: center;
        }
        .title {
            font-weight: bolder;
            padding: 10px 0 ;
        }
        .block .list span {
            display: inline-block;
            background-color: #f5f5f5;
            /* padding: 5px 10px; */
            border-radius:5px ;
            margin-right: 10px;
            margin-bottom: 10px;
        }
    </style>
</head>
<body>
    <div id="app">
        <div class="searchbox">
            <input type="text" placeholder="搜索商家、商品名称" v-model="searchText">
            <span v-on:click="search">搜索</span>
        </div>
        <div class="block">
            <div class="title">历史搜索</div>
            <div class="list">
                <span v-for="(item,index) in searchArr">{{item}}</span>
            </div>
        </div>
    </div>
    <script src="./vue-2.5.21.js"></script>
    <script src="./index-输入框的绑定.js"></script>
</body>
</html>